﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WpfApp1.Models
{
    public class Dept: INotifyPropertyChanged
    {
        public Dept(int id, string name, int parentId)
        {
            Id = id;
            Name = name;
            ParentId = parentId;
        }

        public int Id { get; set; }
        public string? Name { get; set; }
        public int ParentId { get; set; }
        public List<Dept> SubDepts { get; set; } = new List<Dept>();
        public List<User> Users { get; set; } = new List<User>();

        public event PropertyChangedEventHandler? PropertyChanged;
    }
}
